﻿/**
 * Jean-François Desgagné 2009 Portfolio
 * Copyright (c) 2009 Jean-François Desgagné <jfesgagne@gmail.com>
 * 
 * This work is licensed under a Creative Commons Attribution 3.0 United States License.
 * Some Rights Reserved.
 */
package com.jfdesgagne.jfdesgagne09.shell.model {
	import com.jfdesgagne.jfdesgagne09.shell.ApplicationFacade;
    import com.jfdesgagne.jfdesgagne09.shell.model.ConfigProxy;
    import com.jfdesgagne.jfdesgagne09.shell.model.vo.MainMenuItemVO;
    import com.jfdesgagne.jfdesgagne09.shell.model.vo.BottomMenuItemVO;
    import org.puremvc.as3.multicore.interfaces.IProxy;
    import org.puremvc.as3.multicore.patterns.proxy.Proxy;

    public class FrameProxy extends Proxy implements IProxy {
		public static const NAME:String = "FrameProxy";
        
		public var mainMenu:Array;
		public var bottomMenu:Array;
		
		public function FrameProxy() {
			super(NAME, new Object());
			trace("FrameProxy");
		}
		
		override public function onRegister():void {
			trace("asasdd");
			this.setMainMenu();
			this.setBottomMenu();
		}
		
		private function setMainMenu():void {
			this.mainMenu = new Array();
			this.mainMenu.push(new MainMenuItemVO("showcase", LocaleProxy.getString("IDS_MAINMENU_PROJECTSSHOWCASE"), LocaleProxy.getString("IDS_MAINMENU_PROJECTSSHOWCASE2"), LocaleProxy.getString("IDS_MAINMENU_PROJECTSSHOWCASE_TOOLTIP"), "A"));
			this.mainMenu.push(new MainMenuItemVO("profile", LocaleProxy.getString("IDS_MAINMENU_PROFILE"), LocaleProxy.getString("IDS_MAINMENU_PROFILE2"), LocaleProxy.getString("IDS_MAINMENU_PROFILE_TOOLTIP"), "B"));
			this.mainMenu.push(new MainMenuItemVO("blog", LocaleProxy.getString("IDS_MAINMENU_BLOG"), LocaleProxy.getString("IDS_MAINMENU_BLOG2"), LocaleProxy.getString("IDS_MAINMENU_BLOG_TOOLTIP"), "C"));
			this.mainMenu.push(new MainMenuItemVO("contact", LocaleProxy.getString("IDS_MAINMENU_CONTACT"), LocaleProxy.getString("IDS_MAINMENU_CONTACT2"), LocaleProxy.getString("IDS_MAINMENU_CONTACT_TOOLTIP"), "D", ConfigProxy.getInstance().config.contact.email));	
		}
		
		private function setBottomMenu():void {
			this.bottomMenu = new Array();
			this.bottomMenu.push(new BottomMenuItemVO("tooltip", LocaleProxy.getString("IDS_BOTTOMMENU_TOOLTIP"), LocaleProxy.getString("IDS_BOTTOMMENU_TOOLTIP_TOOLLTIP"), "T"));
			this.bottomMenu.push(new BottomMenuItemVO("fullscreen", LocaleProxy.getString("IDS_BOTTOMMENU_FULLSCREEN"), LocaleProxy.getString("IDS_BOTTOMMENU_FULLSCREEN_TOOLTIP"), "F"));
			this.bottomMenu.push(new BottomMenuItemVO("help", LocaleProxy.getString("IDS_BOTTOMMENU_HELP"), LocaleProxy.getString("IDS_BOTTOMMENU_HELP_TOOLTIP"), "H", false));
		}
		
		public static function getInstance():FrameProxy {
			return ApplicationFacade.getInstance(ApplicationFacade.NAME).retrieveProxy(FrameProxy.NAME) as FrameProxy;
		}
	}
}